<?php

class Util{
	
	static function callMethod ($method, $params){
		
		if(method_exists($this, $method)){
			
			$this->$method($params);
			
		}
		else{
			
			$this->init();
			
		}
		
	}

	static function loadView($view, array $params = NULL){
		
		$data = $params;
		require_once _view_.'vew'.$view.'.phtml';
		
	}
	
	/*function __call($var, $value){
		
		$type = substr($var, 0, 3);
		$attr = strtolower(substr($var, 3));
		echo $attr;
		
	}*/
	
	static function reverseDate($date){
		$ex = explode('-',$date);
		$new = $ex[2].'/'.$ex[1].'/'.$ex[0];
		return $new;
	}
}